#include "..\NUnit\NUnitModule.h"
//Declare_System_IComparer(string, char*)

/////<summary>
///// Types::Boxing and Unboxing
/////</summary>
//public static_ void Box()
//{
//	box();
//}
//public static_ void Unbox()
//{
//	unbox();
//}

///<summary>
/// Types::Reference Types
///</summary>
//class
//interface

///<summary>
/// Types::Types Reference Tables::Default Values Table
///</summary>
private_ static_ Types_TypesReferenceTables_DefaultValuesTable()
{
	if (default(bool) != false) { throw(AssertFailed, L"bool"); }
	if (default(byte) != 0) { throw(AssertFailed, L"byte"); }
	if (default(char) != '\0') { throw(AssertFailed, L"char"); }
	if (default(decimal) != 0.0F) { throw(AssertFailed, L"decimal"); }
	if (default(double) != 0) { throw(AssertFailed, L"double"); }
	if (default(float) != 0) { throw(AssertFailed, L"float"); }
	if (default(int_) != 0) { throw(AssertFailed, L"int_"); }
	if (default(long_) != 0L) { throw(AssertFailed, L"long_"); }
	if (default(sbyte) != 0) { throw(AssertFailed, L"sbyte"); }
	if (default(short_) != 0) { throw(AssertFailed, L"short_"); }
	if (default(uint) != 0) { throw(AssertFailed, L"uint"); }
	if (default(ulong) != 0) { throw(AssertFailed, L"ulong"); }
	if (default(ushort) != 0) { throw(AssertFailed, L"ushort"); }
	if (default(string) != null) { throw(AssertFailed, L"string"); }
}

///<summary>
/// Statements::Selection Statements
///</summary>
private_ static_ void Statements_SelectionStatements()
{
	//foreach_in(x);
}

///<summary>
/// Statements::Exception Handling Statements
///</summary>
private_ static_ void Statements_ExceptionHandlingStatements()
{
	//throw(Error, L"Param");
	//throw_;
	//+ try_catch
	int_ index = 0;
	try_catch(
		index++;
	,
		index++;
	);
	if (index != 1) { throw(AssertFailed, L"try_catch"); }
	//+ try_finally
	index = 0;
	try_finally(
		index++;
	,
		index++;
	);
	if (index != 2) { throw(AssertFailed, L"try_finally"); }
	//+ try_catch_finally
	index = 0;
	try_catch_finally(
		index++;
	,
		index++;
	,
		index++;
	);
	if (index != 2) { throw(AssertFailed, L"try_catch_finally"); }
}

///<summary>
/// DisposableObject class
///</summary>
private_ void Dispose(System_IDisposable *t) { }
public class(DisposableObject,System_Object,classInterface(System_IDisposable),
);
Declare_DefaultCtor(public,DisposableObject)
Implement_Type(DisposableObject,System_Object,typeInterface(System_IDisposable),
	System_ObjectVector *vtable = t->System_IDisposable.__vtable;
	vtable[_System_IDisposableVIndex_Dispose] = (System_ObjectVector)&Dispose;
)
Implement_DefaultCtor(DisposableObject,System_Object)

///<summary>
/// Namespaces
///</summary>
private_ static_ void Namespaces()
{
	//+ using
	int_ index = 0;
	using(obj,DisposableObject *obj = new(,DisposableObject),
		index++;
	,delete(obj));
	if (index != 1) { throw(AssertFailed, L"using"); }
	////+ using
	//index = 0;
	//obj = null;
	//using(,obj,DisposableObject,
	//	index++;
	//);
	//delete(obj);
	//if (index != 1) { throw(AssertFailed, L"using"); }
}

///<summary>
/// Operator Keywords
///</summary>
private_ static_ void OperatorKeywords()
{
}


///<summary>
/// Access Keywords
///</summary>
private_ static_ void AccessKeywords()
{
}

///<summary>
/// ThunkC Keywords
///</summary>
private_ static_ void ThunkCKeywords()
{
}


///<summary>
/// ThunkC Keywords::Class Extentions
///</summary>
private_ static_ void ThunkCKeywords_ClassExtentions()
{
}

///<summary>
/// RunTests
///</summary>
public static_ void space(ThunkFixture,RunTests)()
{
	Test(Types_TypesReferenceTables_DefaultValuesTable);
	Test(Statements_SelectionStatements);
	Test(Statements_ExceptionHandlingStatements);
	Test(Namespaces);
	Test(OperatorKeywords);
	Test(AccessKeywords);
	Test(ThunkCKeywords);
	Test(ThunkCKeywords_ClassExtentions);
}